import request from '@/axios'

export const getVideoFiles = (data) => {
  return request.post({ url: '/api/File/GetVideoFiles', data })
}
export const updateFileRemarkApi = (data) => {
  return request.post({ url: '/api/File/UpdateFile', data })
}
export const getLogFiles = (data) => {
  return request.post({ url: '/api/File/GetLogFiles', data })
}
export const getImageFiles = (data) => {
  return request.post({ url: '/api/File/GetImageFiles', data })
}
export const getAudioFiles = (data) => {
  return request.post({ url: '/api/File/GetAudioFiles', data })
}
export const deleteFiles = (data) => {
  return request.post({ url: '/api/File/DeleteFiles', data })
}
export const downfile = (url) => {
  return request.post({ url, responseType: 'blob' })
}
export const WorkTypeFileReport = (data) => {
  return request.post({ url: '/api/File/WorkTypeFileReport', data })
}
export const CheckedProblem = (params) => {
  return request.get({ url: '/api/File/CheckedProblem', params })
}
export const EditFileBrowseApi = (params) => {
  return request.get({ url: '/api/FileBrowse/EditFileBrowse', params })
}
/**
 * 违章记录
 * @param data
 * @returns
 */
export const getCheckProblems = (data) => {
  return request.post({ url: '/api/ProblemFile/GetCheckProblems', data })
}
/**
 * 复查
 * @param data
 * @returns
 */
export const getCorrentProblems = (data) => {
  return request.post({ url: '/api/ProblemFile/GetReCheckProblems', data })
}
/**
 * 整改记录
 * @param data
 * @returns
 */
export const getReCheckProblems = (data) => {
  return request.post({ url: '/api/ProblemFile/GetCorrentProblems', data })
}

/**
 * add违章记录
 * @param data
 * @returns
 */
export const addCheckProblems = (data) => {
  return request.post({ url: '/api/ProblemFile/AddProblem', data })
}

/**
 * add整改记录
 * @param data
 * @returns
 */
export const addProblemCorrect = (data) => {
  return request.post({ url: '/api/ProblemFile/AddProblemCorrect', data })
}

/**
 * add复查记录
 * @param data
 * @returns
 */
export const addProblemRecheck = (data) => {
  return request.post({ url: '/api/ProblemFile/AddProblemRecheck', data })
}

/**
 * 获取文件信息
 * @param data
 * @returns
 */
export const getFileApi = (params) => {
  return request.get({ url: '/api/File/GetFile', params })
}

export const getPalyFileApi = (params) => {
  return request.get({ url: '/api/FileBrowse/PalyStationFile', params }) //, responseType: 'blob'
}
export const getPalyCutFileApi = (params) => {
  // return request.get({ url: '/api/FileBrowse/PalyCutFile', params }) //, responseType: 'blob'
  return request.get({ url: '/api/FileBrowse/PalyStationFile', params })
}
export const SetHomeShowApi = (data) => {
  return request.post({ url: '/api/ProblemFile/SetHomeShow', data })
}
export const GetImageFilesApi = (params) => {
  return request.get({ url: '/api/File/GetImageFiles', params, responseType: 'blob' })
}

export const CutVideoFileApi = (params) => {
  return request.get({ url: '/api/File/CutVideoFile', params, responseType: 'blob' })
}
export const AddFileBrowseApi = (params) => {
  return request.get({ url: '/api/FileBrowse/AddFileBrowse', params })
}

export const UserFileReportApi = (data) => {
  return request.post({ url: '/api/File/UserFileReport', data })
}
export const DepartmentFileReportApi = (data) => {
  return request.post({ url: '/api/File/DepartmentFileReport', data })
}

export const DepartmentCheckReportApi = (data) => {
  return request.post({ url: '/api/File/DepartmentCheckReport', data })
}
export const ClassCheckReportApi = (data) => {
  return request.post({ url: '/api/File/ClassCheckReport', data })
}
/**
 * 设备统计按厂商
 * @param data
 * @returns
 */
export const DeviceStatisticsApi = (data) => {
  return request.post({ url: '/api/Device/DeviceStatisticsByManufacturer', data })
}

/**
 * 设备统计按部门统计
 * @param data
 * @returns
 */
export const DeviceStatisticsByDepartmentApi = (data) => {
  return request.post({ url: '/api/Device/DeviceStatisticsByDepartment', data })
}

/**
 * 系统任务
 * @param data
 * @returns
 */
export const GetFileUploadStatusApi = (data) => {
  return request.post({ url: '/api/File/GetFileUploadStatus', data })
}

///api/File/GetFileDepTrees
export const GetFileDepTreesApi = (data) => {
  return request.post({ url: '/api/File/GetFileDepTrees', data }) //, responseType: 'blob'
}
